<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ attribute name="addOnClass" required="true"%>
<%@ attribute name="type" required="true"%>
<%@ attribute name="name" required="true"%>
<%@ attribute name="placeholder" required="true"%>
<%@ attribute name="value" required="false"%>

<div class="control-group">
  <div class="controls">
    <div class="input-prepend">
      <span class="add-on"><i class="${addOnClass}"></i></span>
      <c:set var="attrs" value='type="${type}" name="${name}" placeholder="${placeholder}"' />
      <c:if test="${value != null}"><c:set var="attrs" value='${attrs} value="${value}"' /></c:if>
      <input ${attrs} />
    </div>
  </div>
</div>
